package com.iplay.service.user;

import java.util.Optional;

import com.iplay.dto.ApiResponse;
import com.iplay.entity.user.SimplifiedUserDO;
import com.iplay.entity.user.UserDO;

public interface UserService {

	ApiResponse<?> createOrdinaryUser(String email, String username, String password);
	
	ApiResponse<?> createAdministrator(String username, String password);
	
	ApiResponse<?> createManager(String username, String password);
	
	Optional<UserDO> createDeveloper(String username, String password);
	
	boolean isUsernameOccupied(String username);
	
	boolean isEmailOccupied(String email);
	
	Optional<UserDO> findByUsername(String username);
	
	Optional<SimplifiedUserDO> findSimplifiedUserByUsername(String username);
	
	Optional<UserDO> findById(int id);
	
	boolean deleteUser(int id);
	
	boolean deleteUser(String username);
	
	Optional<UserDO> update(UserDO user);
	
	ApiResponse<String> updatePassword(int userId, String password, String newPassword);
	
	ApiResponse<String> updatePassword(String email, String newPassword);
}
